 import request from '../http'
 import qs from 'qs'
 const lu = {
  getBuildList(params) {
     return request({
       url: '/basic/getBuildList',
       method: 'get',
       params: params,
     })
   },
   getSubBuildList(params) {
     return request({
       url: '/basic/getSubBuildList',
       method: 'get',
       params: params,
     })
   },
   addBuildingInfo(params) {
     return request({
       url: '/basic/addBuildingInfo',
       method: 'post',
       data: params,
     })
   },
   delBuildingInfo(params) {
     return request({
       url: '/basic/delBuildingInfo',
       method: 'post',
       data: params,
     })
   },
   updateBuildingInfo(params) {
     return request({
       url: '/basic/updateBuildingInfo',
       method: 'post',
       data: params,
     })
   },
   downloadBuildModel(params) {
     return request({
       url: '/basic/downloadBuildModel',
       method: 'get',
       params: params,
       responseType: "arraybuffer",
     })
   },
   exportBuildList(params) {
     return request({
       url: '/basic/exportBuildList',
       method: 'get',
       params: params,
       responseType: "arraybuffer",
     })
   },

  //  居民管理 居民列表
  getInhabitList(params) {
    return request({
      url: '/basic/getInhabitList',
      method: 'get',
      params: params,
    })
  },
  // 获取家庭成员列表
  getFamilylist(params) {
    return request({
      url: '/basic/getFamilylist',
      method: 'get',
      params: params,
    })
  },
  // 修改居民信息
  batchModifyInhabit(params) {
    return request({
      url: '/basic/batchModifyInhabit',
      method: 'post',
      data: params,
    })
  },
  // 添加居民信息
  addInhabitInfo(params) {
    return request({
      url: '/basic/addInhabitInfo',
      method: 'post',
      data: params,
    })
  },
  // 更新居民信息
  updateInhabitInfo(params) {
    return request({
      url: '/basic/updateInhabitInfo',
      method: 'post',
      data: params,
    })
  },
  // 删除居民信息
  delInhabitInfo(params) {
    return request({
      url: '/basic/delInhabitInfo',
      method: 'post',
      data: params,
    })
  },
  // 下载居民excel导入模板
  downloadinhbatModel(params) {
    return request({
      url: '/basic/downloadinhbatModel',
      method: 'get',
      params: params,
    })
  },
  // 居民信息列表导出功能
  exportInhabitList(params) {
    return request({
      url: '/basic/exportInhabitList',
      method: 'get',
      params: params,
    })
  },
  // 楼栋信息excel导入功能
  uploadBuildList(data) {
    return request({
      url: '/basic/uploadBuildList',
      method: 'post',
      data
    })
  },
  // 紧急求助列表查询
  findAllEmergencyList(params) {
    return request({
      url: '/emergency/findAllEmergencyList',
      method: 'get',
      params: params,
    })
  },
  // 查看单个求助信息
  getEmergencyInfoById(params) {
    return request({
      url: '/emergency/getEmergencyInfoById',
      method: 'get',
      params: params,
    })
  },
  // 处理求助信息、分配紧急度（接口二合一）
  dealEmergency(params) {
    return request({
      url: '/emergency/dealEmergency',
      method: 'post',
      data: params,
    })
  },
  // 处理多个
  batchAssign (params) {
    return request({
      url: '/emergency/batchAssign ',
      method: 'post',
      data: params,
    })
  },
  // 获取当前居委会所有的工作人员
  getNeighborMember(params) {
    return request({
      url: '/emergency/getNeighborMember',
      method: 'get',
      params: params,
    })
  },
  // 求助信息列表导出功能
  exportEmergencyInfo(params) {
    return request({
      url: '/emergency/exportEmergencyInfo',
      method: 'get',
      responseType: 'arraybuffer',
      params: params,
    })
  },
 }
 export default lu
